/* 
 * File:   Job.cpp
 * Author: kuba
 * 
 * Created on 7. listopad 2012, 19:01
 */

#include "Job.h"

using std::string;


Job::Job(int id, int pgid, const char* cmd, State state, bool piped)
  : id(id), pgid(pgid), cmd(cmd), state(state), piped(piped)
{
  //this->cmd = new string(cmd);
  //this->cmd.assign(cmd);
}


Job::~Job() { }


int Job::getId() const
{
  return id;
}


int Job::getPgid() const
{
  return pgid;
}


const char* Job::getCmd() const
{
  return cmd.c_str();
}


Job::State Job::getState() const
{
  return state;
}


bool Job::isPiped() const
{
  return piped;
}


void Job::setState(State state)
{
  this->state = state;
}

